package element.synt;

import ast.AstItem;
import element.base.Synt;

import java.util.ArrayList;
import java.util.List;

public class FuncRParams extends Synt {
    @Override
    public List<AstItem> toAsts() {
        List<AstItem> items = new ArrayList<>();
        int paramCount = (getNodes().size() + 1) / 2;
        for (int i = 0; i < paramCount; i++) {
            Exp exp = (Exp) getNodes().get(2 * i);
            items.add(exp.toAst());
        }
        return items;
    }
}
